package Content;

import java.util.HashMap;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import Subject.SubjectItem;

public interface ContentMapper {
	ContentItem selectBynum(int num);
	
	List<HashMap<String,Object>> selectAll(@Param("str") String str,@Param("temp") String temp,@Param("board_id") int board_id,@Param("subject_id") Integer subject_id);
	void insert(ContentItem item);
	void deleteBynum(int num);
	List<ContentItem> selectByBoard_id(int board_id);
	
	List<ContentItem> selectPage(@Param("currentPage") int currentPage, @Param("pageSize") int pageSize,@Param("str") String str,@Param("temp") String temp,@Param("board_id") int board_id,@Param("subject_id") Integer subject_id);
	
	
	void updateById(ContentItem item);
	
	
	
	int selectCount(@Param("str") String str,@Param("temp") String temp,@Param("board_id") int board_id,@Param("subject_id") Integer subject_id);
	
	

	
	List<ContentItem> selectBySubject(int subject_id);
	
	String searchSubject();
	

	List<ContentItem> selectByContent(@Param("content") String content,@Param("board_id") int board_id);

	List<ContentItem> selectByTitle(@Param("title") String title,@Param("board_id") int board_id);

	List<ContentItem> selectByWriter(@Param("writer") String writer,@Param("board_id") int board_id);

	List<ContentItem> selectByContentTitle(@Param("content") String content,@Param("board_id") int board_id);
	
	List<ContentItem> selectBySubjectContent(int subject_id,String content);
	
	List<ContentItem> selectBySubjectTitle(@Param("subject_id") int subject_id,@Param("title") String title);
	
	List<ContentItem> selectBySubjectWriter(int subject_id,String writer);
	
	List<ContentItem> selectBySubjectContentTitle(int subject_id,String content);
	
	List<HashMap<String,Object>> selectNotice(int board_id);
	
	void upHit(int id);
	
	void upReplyCount(int id);
	
	void downReplyCount(int id);

	void downHit(int id);
}
